package singleton;

import java.io.Serializable;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;

/**
 * @ClassName Client
 * @Description TODO
 * @Author 李奉武
 * @Motto 逆水行舟, 不进则退
 * @Date 2022/3/31 11:46
 * @Version 1.0
 */
public class Client  {
    public static void main(String[] args) throws InstantiationException, IllegalAccessException, NoSuchFieldException, NoSuchMethodException, InvocationTargetException {
        /*HungrySingleton s = HungrySingleton.getIncetence();
        HungrySingleton ss = HungrySingleton.getIncetence();
        System.out.println("s.hashCode()==ss.hashCode() = " + (s.hashCode() == ss.hashCode()));*/

        /*LazySingleton t = LazySingleton.getIncetence();
        LazySingleton tt = LazySingleton.getIncetence();
        System.out.println("(t.hashCode()==tt.hashCode()) = " + (t.hashCode() == tt.hashCode()));*/

       /* LazySingletonTwo tence1 = LazySingletonTwo.getIncetence();
        LazySingletonTwo tence2 = LazySingletonTwo.getIncetence();
        System.out.println("(t.hashCode()==tt.hashCode()) = " + (tence1.hashCode() == tence2.hashCode()));*/

        /*LazySingletonThree instance1 = LazySingletonThree.getInstance();
        LazySingletonThree instance2 = LazySingletonThree.getInstance();
        System.out.println("(t.hashCode()==tt.hashCode()) = " + (instance1.hashCode() == instance2.hashCode()));*/

        /*LazySingletonEunm instance1 = LazySingletonEunm.getinstance();
        LazySingletonEunm instance2 = LazySingletonEunm.getinstance();
        System.out.println("(t.hashCode()==tt.hashCode()) = " + (instance1.hashCode() == instance2.hashCode()));*/

    }
}
